/* $RCSFile: ADNDynNotification.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/CRMWrapper3/DynEntities/ADNDynNotification.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:33  christian.surieux
 *   Added Log to All cs files
 */

/* Copyrights Christian Surieux 2010 */
/* Class ADNDynNotification */
/* Date 2010-01-06 16:08:53Z */

using System;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using CrmSdk;

namespace AddonNice.CRMWrapper
{
    public class ADNDynNotification : DynEntity
    {
        protected class Ftor: DFactor
        {
            public Ftor() : base(CrmStr.notification)
            {}

            public override Type DynType
            { get { return typeof(ADNDynNotification); } }

            public override string DynTypename
            {   get{ return CrmStr.notification;}}

            public override DynEntity Build()
            {   return new ADNDynNotification();}

            public override DynEntity Build(CRMWrapperBase w, InternalDynamicEntity dEntity, PropertyDescriptorCollection wproperties)
            {   return new ADNDynNotification(w, dEntity, wproperties, null);}

            public override DynEntity Build(CRMWrapperBase w, string PrimaryFieldValue)
            {   return new ADNDynNotification(w,PrimaryFieldValue);}

            public override DynEntity Build(CRMWrapperBase w,Guid PrimaryKeyValue)
            {   return new ADNDynNotification(w,PrimaryKeyValue);}
        }

        static ADNDynNotification(){new Ftor();} 
        
        public override bool HasOwnerProperty
        {
            get { return false; }
        }
        public override bool HasPrimaryField
        {
            get
            { return false; }
        }

        public ADNDynNotification() : base() { }
        
        public ADNDynNotification(CRMWrapperBase w,string PrimaryFieldValue)
            : base(w,CrmStr.notification)
        { }
        
        public ADNDynNotification(CRMWrapperBase w,Guid CrmId) : base(w,CrmStr.notification,CrmId) { }
        
        public ADNDynNotification(CRMWrapperBase w,InternalDynamicEntity e) : base(w,CrmStr.notification,e,null,null) { }
        
        public ADNDynNotification(CRMWrapperBase w,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(w,CrmStr.notification,e,prop,s) { }
        
        public ADNDynNotification(ResetWrapperHandler fn,string PrimaryFieldValue)
            : base(fn,CrmStr.notification)
        { }

        public ADNDynNotification(ResetWrapperHandler fn,Guid CrmId) : base(fn,CrmStr.notification,CrmId) { }
        
        public ADNDynNotification(ResetWrapperHandler fn,InternalDynamicEntity e) : base(fn,CrmStr.notification,e,null,null) { }
        
        public ADNDynNotification(ResetWrapperHandler fn,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(fn,CrmStr.notification,e,prop,s) { }

        /* Properties */

        [CrmDynAttribute(CrmStr.notification)]
        public Guid notificationid
        {
            get
            { return KeyPropertyValue(CrmStr.notificationid); }
            set
            { AddKeyProperty(CrmStr.notificationid,value); }
        }

        protected override void SetCrmIdProperty(Guid crmId)
        {
            if ( !dicProperty.ContainsKey(CrmStr.notificationid) || KeyPropertyValue(CrmStr.notificationid) != crmId )
                notificationid = crmId;
        }
        public override Guid PrimaryKeyGuidValue
        {
            get
            { return notificationid; }
            set { notificationid = value; }
        }
        [CrmDynAttribute(CrmStr.notification)]
        public string createdonstring
        {
            get
            { return StringPropertyValue(CrmStr.createdonstring); }
            set
            { AddStringProperty(CrmStr.createdonstring,value); }
        }

        [CrmDynAttribute(CrmStr.notification)]
        public string eventdata
        {
            get
            { return StringPropertyValue(CrmStr.eventdata); }
            set
            { AddStringProperty(CrmStr.eventdata,value); }
        }

        [CrmDynAttribute(CrmStr.notification)]
        public int eventid
        {
            get
            { return NumberPropertyValue(CrmStr.eventid); }
            set
            { AddNumberProperty(CrmStr.eventid,value); }
        }

        [CrmDynAttribute(CrmStr.notification)]
        public int notificationnumber
        {
            get
            { return NumberPropertyValue(CrmStr.notificationnumber); }
            set
            { AddNumberProperty(CrmStr.notificationnumber,value); }
        }

    }
}